# 转换为整数
# str -> int
s = "2025"
n = int(s)
print(type(s),type(n))

# float -> int
s1 = 3.14
print(int(s1))
print(type(int(s1)))

# bool -> int
s2,s3= True,False
print(int(s2),int(s3))


# 转为浮点数
# str -> float
s4 = "3.14"
print(float(s4))

# int -> float
n = 2025
print("n===>",float(n)) # 2025.0

# bool -> float
print(float(s2),float(s3))


# 转为bool
# str -> bool
m = "sad520"
print("m=====>",bool(m))
w = ""
print("w=====>",bool(w))

print("🌈"*20)

# float -> bool
f = 3.14
print("f=====>",bool(f)) # True

f = 0.0
print("f=====>",bool(f)) # False


print("🍎"*20)

# 转为字符串
# int -> str
num = 5
print("num======>",str(num))


